package cn.edu.cdu.group4nb.mapper;

import cn.edu.cdu.group4nb.po.Institution;
import cn.edu.cdu.group4nb.po.Position;
import cn.edu.cdu.group4nb.po.Recruit;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface RecruitmentMapper {

    List<Map<String,Object>> selectAllPositionByInstitutionId(int institutionId);

    Institution selectInstitutionOfLoginUser(int userInfoId);

    List<Position> selectPositionByInstitutionIdOfLoginUser(int userInfoId);

    int getPositionNumByInstitutionIdAndPositionId(@Param("institutionId")int institutionId, @Param("positionId")int positionId);

    List<Map<String,Object>> selectAllRecruit();
    /**
     * 查询登录用户角色
     * @return
     */
    int getRoleIdOfLoginUser(int userInfoId);
    /**
     * 根据id招聘信息
     * @return
     */
    int publishRecruit(Recruit record);
    /**
     * 查询已发布招聘信息
     * @return
     */
    List<Map<String,Object>> listRecruit();
}


